package com.etc.dao;

import java.sql.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.etc.entity.Company;
import com.etc.entity.RecJoin;
import com.etc.entity.Recruitment;

/**
 * 招聘会表Dao接口
 * @author Administrator
 *
 */
public interface RecruitmentMapper {
    
	/**
	 * 全部查询
	 * @return
	 */
	public List<Recruitment> selectRec();
	
	/**
	 * 按地区查询
	 * @return
	 */
	public List<Recruitment> selectRecByCity(String strLike);
	
	/**
	 * 按招聘会名字查询
	 * @param strLike
	 * @return
	 */
	public List<Recruitment> selectRecName(String strLikeName);
	
	/**
	 * 增加招聘会
	 * @param recName
	 * @param place
	 * @param sponsor
	 * @param recTel
	 * @param string
	 * @param applyTime
	 * @param recState
	 * @return
	 */
	public boolean AddRec(Recruitment recruitment);
	
	
	/**
	 * 根据招聘会名称删除招聘会
	 * @param recName
	 * @return
	 */
	public boolean selectRecDel(String recName);
	
	/**
	 * 根据招聘会名称修改招聘会的状态
	 * @param recState
	 * @param recName
	 * @return
	 */
	public boolean selectRecUpd(@Param("recState")int recState,@Param("recName")String recName);
	
	/**
	 * 后台修改招聘会信息
	 * @param recruitment
	 * @return
	 */
	public boolean updRec(Recruitment recruitment);
	/**
	 * 模糊查询+分页
	 * @param keywords
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<Recruitment> selectRecByPage(@Param("keywords")String keywords,
			@Param("start")int start,@Param("limit")int limit);
	
	/**
	 * 相差时间计算
	 * @param date
	 * @return
	 */
	public int selectDate(String strDate);
	
	/**
	 * 根据招聘会id查企业id
	 * @param recId
	 * @return
	 */
	public List<Integer> selectcomId(Integer recId);
    
	/**
	 * 根据企业id查企业名称
	 * @param comId
	 * @return
	 */
    public List<Company> selectcomName(int comId);
	
	
	public int getRecruitmentCount();
	
}
